package com.jkoss.wine.system.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;

/**
 * <p>
 * 权限
 * </p>
 *
 * @author Jason
 * @since 2018-09-20
 */
public class Permission extends Model<Permission> {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId("id")
	private String id;
	/**
	 * 父级id
	 */
	@TableField("pid")
	private String pid;
	/**
	 * 名称
	 */
	@TableField("name")
	private String name;
	/**
	 * URL
	 */
	@TableField("url")
	private String url;
	/**
	 * 序号
	 */
	@TableField("sort")
	private BigDecimal sort;
	/**
	 * 备注
	 */
	@TableField("remk")
	private String remk;
	/**
	 * 类型:1-展示菜单、2-功能菜单、3-功能按钮
	 */
	@TableField("type")
	private Integer type;
	/**
	 * 图标
	 */
	@TableField("icon")
	private String icon;
	@TableField("level")
	private BigDecimal level;
	/**
	 * 是否删除：0-未删除、1-已删除、2-不能删除
	 */
	@TableField("del")
	private Integer del;

	@TableField(exist = false)
	private List submenu;

	public List getSubmenu() {
		return submenu;
	}

	public void setSubmenu(List submenu) {
		this.submenu = submenu;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public BigDecimal getSort() {
		return sort;
	}

	public void setSort(BigDecimal sort) {
		this.sort = sort;
	}

	public String getRemk() {
		return remk;
	}

	public void setRemk(String remk) {
		this.remk = remk;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public BigDecimal getLevel() {
		return level;
	}

	public void setLevel(BigDecimal level) {
		this.level = level;
	}

	public Integer getDel() {
		return del;
	}

	public void setDel(Integer del) {
		this.del = del;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Permission{" + ", id=" + id + ", pid=" + pid + ", name=" + name + ", url=" + url + ", sort=" + sort
				+ ", remk=" + remk + ", type=" + type + ", icon=" + icon + ", level=" + level + ", del=" + del + "}";
	}
}
